package org.yzh.protocol.commons.transform.attribute;

import io.github.yezhihao.protostar.annotation.Field;

public class Electric {

    public static final Integer key = 04;

    /**
     * 充电状态, 0：接入充电器，1：未接入充电
     */
    @Field(length = 1, desc = "充电状态, 0：接入充电器，1：未接入充电")
    private int state;

    @Field(length = 1, desc = "电量百分比")
    private int percent;

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getPercent() {
        return percent;
    }

    public void setPercent(int percent) {
        this.percent = percent;
    }

    @Override
    public String toString() {
        return "Electric{" +
                "state=" + state +
                ", percent=" + percent +
                '}';
    }
}
